#!/bin/bash
server_name="api-doc-server"
title "$server_name"
var="test"
echo "$var"

for file in $(ls)
do
    if echo "$file" | grep -q "$server_name"; then
        var="$file"
    fi
done

echo "$var"

run_cmd="nohup java -Xms64m -Xmx128m -jar $var $server_name"
echo "$run_cmd"

# 前台启动
eval "$run_cmd"
# 后台启动
#nohup $run_cmd &